init python:

    def pnc_click():
        global pncSurfName, pncClueList, quick_menu
        pncSurf = renpy.load_surface(im.Image(pncSurfName))
        mymousepos = renpy.get_mouse_pos()
        if (mymousepos[0] >= pncSurf.get_width()) or (mymousepos[1] >= pncSurf.get_height()):
            return
        clicked_color = pncSurf.get_at(mymousepos)
        for ti,tx in enumerate(pncClueList):
            tc = tx[0]
            if (clicked_color == Color(tc) and tx[2] == 0):
                pncClueList[ti][2] = 1
                renpy.sound.play("audio/found.ogg")
                quick_menu = True
                renpy.jump(tx[1])
            else:
                renpy.sound.play("audio/not_found.ogg")

    def pnc_fakeclick(option):
        global pncClueList, quick_menu
        if (pncClueList[option][2] == 0):
            pncClueList[option][2] = 1
            if (fake_clue == False):
                renpy.sound.play("audio/found.ogg")
                quick_menu = True
            renpy.jump(pncClueList[option][1])
        else:
            renpy.sound.play("audio/not_found.ogg")


    def do_interro():
        renpy.config.skipping = None
        renpy.call_screen("interro_master")

    def do_pnc():
        global pncClueList, quick_menu
        clues = 0
        for tx in pncClueList:
            if (tx[2] == 1):
                clues += 1
        if (clues == len(pncClueList)):
            renpy.show("search_complete",[puzzle_notify])
            renpy.sound.play("audio/puzzle_complete.ogg")
            return
        quick_menu = False
        renpy.config.skipping = None
        renpy.call_screen("pnc_master",clues,len(pncClueList))

    def mind_target_segment(*args):
        global mousex, mousey
        myImage =  Crop((1100 - interro_x + mousex,1100 - interro_y + mousey,110,110), Image("vfx/rings.png"))
        myImage = AlphaMask(myImage,"vfx/lilcircle.png")
        myImage = Composite((110,110), (0,0), myImage, (0,0), "vfx/target.png")
        return myImage, None    

    def interro_click():
        global mousex, mousey, interro_exit
        mousex = renpy.get_mouse_pos()[0] - 50
        mousey = renpy.get_mouse_pos()[1] - 50
        renpy.show("mind_ring",[mind_transform])
        renpy.play("audio/psi_fail.ogg")
        renpy.block_rollback()
        if (abs(interro_x - (mousex+50)) < 30 and abs(interro_y - (mousey+50)) < 30):
            renpy.play("audio/psi_success.ogg")
            renpy.call_in_new_context("interro_pause")
            renpy.jump(interro_exit)

    def interro_fakeclick(mx,my):
        global mousex, mousey, interro_exit
        mousex = mx-10
        mousey = my-10
        renpy.show("mind_ring",[mind_transform])
        renpy.play("audio/psi_fail.ogg")
        renpy.block_rollback()
        if (abs(interro_x - (mousex+50)) < 30 and abs(interro_y - (mousey+50)) < 30):
            renpy.play("audio/psi_success.ogg")
            renpy.call_in_new_context("interro_pause")
            renpy.jump(interro_exit)


transform mind_transform:
    xpos mousex
    ypos mousey
    alpha 0.0
    ease 0.2 alpha 1.0
    pause 0.5
    ease 1.0 alpha 0.0

screen pnc_master(found, total):
    if (persistent.console_mode == False):
        use pnc_overlay(found, total)
    else:
        use pnc_fallback(found, total)
    use jsdetect()


screen pnc_fallback(found, total):
    frame:
        xpos 0
        ypos 0
        ysize 42
        xfill True
        background "#0000"
        button:
            xpos 10
            ypos -5
            xsize 140
            background "gui/topmenu_inactive.png"
            hover_background "gui/topmenu_active.png"
            action ShowMenu("preferences")
        frame:
            xpos 1046
            ypos -5
            background "gui/clues_tab.png"
            text "发现的线索:   " + str(found) + "/" + str(total) size 18 xpos 25
        for ti,tx in enumerate(pncClueList):
            button:
                xpos tx[3]
                ypos tx[4]
                xsize 70
                ysize 50
                background "gui/magsearch1.png"
                hover_background "gui/magsearch2.png"
                action Function(pnc_fakeclick,ti)
                null


screen pnc_overlay(found, total):
    default show_hints = False
    button:
        background "#0000"
        xpos 0
        ypos 42
        xfill True
        yfill True
        if (show_hints == False):
            action Function(pnc_click)
    frame:
        xpos 0
        ypos 0
        ysize 42
        xfill True
        background "#0000"
        button:
            xpos 10
            ypos -5
            xsize 140
            background "gui/topmenu_inactive.png"
            hover_background "gui/topmenu_active.png"
            action ShowMenu("preferences")
        button:
            xpos 150
            ypos -5
            xsize 140
            background "gui/hint_inactive.png"
            hover_background "gui/hint_active.png"
            action ToggleLocalVariable("show_hints")
        frame:
            xpos 1046
            ypos -5
            background "gui/clues_tab.png"
            if (gui.preference("font") == "DejaVuSans.ttf"):
                text "找到的线索:   " + str(found) + "/" + str(total) size 18 xpos 25 ypos 7
            else:
                text "找到的线索:   " + str(found) + "/" + str(total) size 18 xpos 25
    if (show_hints):
        frame:
            background Frame("gui/yesno.png", 260,210,80,80)
            xminimum 450
            yminimum 353
            top_padding 30
            bottom_padding 60
            left_padding 80
            xalign 0.5
            yalign 0.5
            has vbox:
                xsize 300
            text search_hint_text
            textbutton _("OK") action [SelectedIf(False), ToggleLocalVariable("show_hints")] style "yesno_button" xalign 0.5

image mind_ring = DynamicDisplayable(mind_target_segment)



image search_start = "gui/begin_search.png"
image search_complete = "gui/search_complete.png"


image interro_start = "gui/begin_intuition.png"

image little_ring:
    "vfx/target_unhover.png"
    xpos 19
    ypos 19
    xanchor 0.5
    yanchor 0.5

transform puzzle_notify:
    xalign 0.5
    yalign 0.5
    alpha 0.0
    zoom 3.0
    ease 0.5 zoom 1.0 alpha 1.0
    pause 1.0
    ease 1.0 alpha 0.0

screen interro_master():
    if (persistent.console_mode == False):
        use interro_overlay
    else:
        use interro_fallback
    use jsdetect

screen interro_overlay():
    button:
        background "#0000"
        xpos 0
        ypos 37
        xfill True
        yfill True
        action Function(interro_click)
    button:
        background "#0000"
        xpos 136
        ypos 0
        xfill True
        ysize 37
        action Function(interro_click)
    button:
        xpos 10
        ypos -5
        xsize 135
        ysize 42
        background "gui/topmenu_inactive.png"
        hover_background "gui/topmenu_active.png"
        action ShowMenu("preferences")

screen interro_fallback():
    button:
        xpos 10
        ypos -5
        xsize 135
        ysize 42
        background "gui/topmenu_inactive.png"
        hover_background "gui/topmenu_active.png"
        action ShowMenu("preferences")
    for ty in range(1,18):
        for tx in range(32):
            button:
                xpos tx*40
                ypos ty*40
                xsize 40
                ysize 40
                background "#FFF0"
                hover_background "little_ring"
                action Function(interro_fakeclick,tx*40 - 25,ty*40 - 25)

label interro_pause:
    with Pause(0.5)
    return

label inter_test:
    scene room with qd

    "This is a temp test. Click around the screen and try to locate the Center of the Rings."

    python:
        interro_x = renpy.random.randint(50,1250)
        interro_y = renpy.random.randint(30,690)
        interro_exit = "day1_start"

    call screen interro_overlay

    "Congratulations you did the thing."

    return

screen popup_screen(mytext):
    add Solid('#0005')
    frame:
        xalign 0.5
        yalign 0.5
        background Frame("gui/yesno.png", 260,210,80,80)
        xmaximum 550
        bottom_padding 80
        left_padding 50
        right_padding 80
        has vbox:
            xpos 20
            ypos 30
            spacing 10
        text mytext xalign 0.5 color "#FFFFFF"
        textbutton _("OK") action Return() style "yesno_button" xalign 0.5

screen manual_popup_screen():
    add Solid('#0005')
    frame:
        xalign 0.5
        yalign 0.5
        background Frame("gui/yesno.png", 260,210,80,80)
        xmaximum 850
        bottom_padding 80
        left_padding 50
        right_padding 80
        has vbox:
            xpos 20
            ypos 30
            spacing 10
        text "Click around the screen to reveal pieces of the target's thought patterns." xalign 0.5 color "#FFFFFF"
        add "intuition_tutorial.jpg" xalign 0.5
        text "Lines curve around the hidden Eye of Enlightenment. Follow the direction suggested by the curves to find the Eye. Wider-spaced lines mean you are further from the goal." xalign 0.5 color "#FFFFFF"
        textbutton _("OK") action Return() style "yesno_button" xalign 0.5
# Decompiled by unrpyc: https://github.com/CensoredUsername/unrpyc

